package org.dromara.llm.domain;

import lombok.Getter;

/**
 * 配置用户类型枚举
 *  处理状态 // "UPLOADED", "COMPLETED", "FAILED"
 * @author miles
 * @version V1.0
 * @date 2025-05-07
 */
@Getter
public enum ConfigUserType {
    /**
     * 系统用户
     */
    SYSUSER("系统用户", "SYS"),
    /**
     * APP用户
     */
    APPUSER("APP用户", "APPUSER");


    private final String name;
    private final String code;

    ConfigUserType(String name, String code) {
        this.name = name;
        this.code = code;
    }

    /**
     * code
     *
     * @param code 代码
     * @return 对象
     */
    public static ConfigUserType getByCode(String code) {
        for (ConfigUserType enumObj : values()) {
            if (enumObj.code.equals(code)) {
                return enumObj;
            }
        }
        return null;
    }

}
